<?php 
//	include "../connect.php";
	$sql7="select * from nhomsanpham where id_nhom=1";
	$kq7=mysql_query($sql7);
	while ($r7=mysql_fetch_array($kq7))
	{
		$id_nhom7=$r7["id_nhom"];
		echo "$id_nhom7<hr>";
?>
<!-- *********************************2********************************************* -->
<div id="TabbedPanels<?php echo $id_nhom7; ?>" class="TabbedPanels">
  <ul class="TabbedPanelsTabGroup">
  <?php	$sql8="select * from loaisanpham where id_nhom=$id_nhom7 and id_loai IN (18,19,25) and ghichu='hienthi'";		
		$kq8=mysql_query($sql8);			
		while($r8=mysql_fetch_array($kq8)){
			$id_loai8=$r8["id_loai"];
			$ten_loai8=$r8["tenloaisp"];
			 echo "<li class=\"TabbedPanelsTab\" tabindex=0>$ten_loai8</li>";
 } ?>   
  </ul>
  
  <div class="TabbedPanelsContentGroup">
   <?php
   		$sql_nd8="select * from loaisanpham where id_nhom=$id_nhom7 and id_loai IN (18,19,25) and ghichu='hienthi'";		
		$kq_nd8=mysql_query($sql_nd8);		
		while($r_nd8=mysql_fetch_array($kq_nd8)){
			$id_loai_nd8=$r_nd8["id_loai"];
			$ten_loai_nd8=$r_nd8["tenloaisp"];
  ?>
    <div class="TabbedPanelsContent2">
    <table width="560" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" style="padding-left:5px;">
    <?php          
			$sql9="select * from sanpham where id_loai=$id_loai_nd8 and ghichu='hienthi'  order by rand() limit 0,6";			
            $kq9=mysql_query($sql9);
			if(!$kq9) echo "";
			else{
			while($r9=mysql_fetch_array($kq9))
			{
				$id9=$r9["id"];$tensp9=$r9["tensp"];$hinh9=$r9["hinh"];$gia9=$r9["gia"];
				$gia92=number_format($gia9,0,'','.');
				if($gia9==0) $s9="(liên hệ)";	else { $s9=$gia92." VND"; }				
				echo "<div class=divshow2>
				<table width=175 height=220 border=0 cellspacing=0 cellpadding=0 background=\"images/box.gif\" style=\"border:1px dotted #999\">
				  <tr>
					<td height=170><a href=?b=ct&id=$id9><img src='sanpham/small/$hinh9' width=170px height=170 border=0> </a></td>
				  </tr>
				  <tr>
					<td height=25 style=\"font-size:12px; color:#F00\"><a href=?b=ct&id=$id9><strong>$tensp9</strong></a></td>
				  </tr>
				  <tr>
					<td height=25>Giá: $s9</td>				 
				</table>		
				</div>";
			}
			}
	?>
     		 </td>
          </tr>
          </tr>
			 <td style="border-top:1px solid #999; padding-top:5px"><div align=right><a href="?b=lsp&idl=<?php echo $id_loai_nd4; ?>">Xem thêm &raquo;&nbsp;&nbsp;</a></div></td>
          </tr> 
        </table>
    </div>
    <?php } ?>
  </div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels<?php echo $id_nhom7; ?> = new Spry.Widget.TabbedPanels("TabbedPanels<?php echo $id_nhom7; ?>");
//-->
</script>
<?php } ?>